












var i18n = {

	/**
	 * Resolve the given message Code, also resolves any arguments of format {0} to 1st argument, etc...
	 * @param messageCode
	 * @param arg... any number of arguments
	 */
	message:function(messageCode /* any number of arguments */) {
		// lazy init for keys
		if (!i18n.keysInitialized) {
			i18n.initKeys();
		}

		var resolved = i18n [messageCode];
		if (!resolved) {
			resolved = "Unknown message '" + messageCode +"'";
			return resolved;
		}

		// replace {0}...etc with the appropriate arguments
		for (var i=1 /* skip 1st arg, that's the messageCode*/ ; i<arguments.length; i++) {
			var arg = arguments[i];
			resolved = resolved.replace("{" + (i-1) +"}", arg);
		}
		return resolved;
	},

	// if the keys are already initialized
	keysInitialized: false,

	initKeys :function() {
		i18n.keysInitialized = true;
		
		
			i18n["tracker.delete.selected.item.confirm"] = "Do you really want to delete the selected tracker items?";
		
			i18n["tracker.subtask.confirm.promote.to.task"] = "Do you really want to convert selected children to root?";
		
			i18n["tracker.admin.warning.changing.template.tracker"] = "Applying '{0}' as a template will replace all current settings of this tracker/category. Are you sure you want to do this?";
		
			i18n["vote.tooltip.no.votes.yet"] = "No votes yet.";
		
			i18n["vote.tooltip.summary"] = "Voted as <span class='vote-positive'>Yes</span> by <b>{0}</b>, <span class='vote-negative'>No</span> by <b>{1}</b> of <b>{2}</b> users.";
		
			i18n["vote.tooltip.yourvote"] = "You voted as <b>{0}</b>.";
		
			i18n["vote.tooltip.yourvote.yes"] = "<span class='vote-positive'>Yes</span>";
		
			i18n["vote.tooltip.yourvote.no"] = "<span class='vote-negative'>No</span>";
		
	}
}


